<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<style>
    #gai {
        white-space: pre-line;
    }
</style>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <div id="shenbox" class="layui-hide">
                    <button class="layui-btn layui-btn-sm btn-dark marginr5" type="button" onclick="check_status(1)" style="background-color: #4CAF50!important;">
                        <i class="layui-icon layui-icon-ok"></i>通过
                    </button>
                    <button class="layui-btn layui-btn-sm btn-light marginr5" type="button" onclick="check_status(9)" style="background-color: #ff982e!important">
                        <i class="layui-icon layui-icon-close"></i>驳回
                    </button>
                </div>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">
        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">审核状态</td><td class="tv" id="status_name" colspan="3"></td></tr>
                <tr><td class="tt">填报人</td><td class="tv" id="created_user_name"></td><td class="tt">填报单位</td><td class="tv" id="dealid_name"></td></tr>
                <tr><td class="tt">项目名称</td><td class="tv" id="enginname"></td><td class="tt">施工单位</td><td class="tv" id="shi_unit_name"></td></tr>
                <tr><td class="tt">日期</td><td class="tv" id="dt"></td><td class="tt">标题</td><td class="tv" id="title"></td></tr>
                <tr><td class="tt">施工概况</td><td class="tv" id="gai" colspan="3"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div><?php include "../public/upinfo_show.php";?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;
    var param_shen = getQueryVariable('shen') || '';

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_engin_shi_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;

                $("#status_name").text(data.status_name);
                $("#enginname").text(data.enginname);
                $("#shi_unit_name").text(data.shi_unit_name);
                $("#dt").text(data.dt);
                $("#title").text(data.title);
                $("#gai").text(data.gai);
                $("#created_user_name").text(data.created_user_name);
                $("#dealid_name").text(data.dealid_name);
                $("#explain").text(data.explain);


                if(res.data.isshen){
                    $("#shenbox").removeClass('layui-hide');
                }

                // $(".pageshowtitle").text('施工日志');

                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('engin_shi', param_id);
        showpage_dropopt();
    });


    function check_status(status) {
        openPage('shen.php?id='+param_id+'&status='+status, '770px', '490px');
    }

</script>
</body>
</html>




